﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Expect.Core;

namespace Expect.VisualStudio.Extensions
{
    static class FixturesHelpers
    {
        public static string ToHint(this FixtureRow row)
        {
            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < row.Count; i++)
            {                            
                if (i % 2 != 0)
                {
                    if (sb.Length > 0) sb.Append(" ");
                    sb.Append("|*|");
                }
                else
                {
                    if (string.IsNullOrEmpty(row[i].Text)) continue;

                    if (sb.Length > 0) sb.Append(" ");
                    sb.Append(row[i].Text);                
                }
            }
            return sb.ToString();
        }
    }
}
